package Service.impl;

import Service.IMyOrderService;
import dao.IMyOrderDao;
import dao.impl.MyOrderDaoImpl;
import pojo.MyOrder;

import java.util.List;

/**
 * @author Mazai_
 * @version 1.0
 * @date 2021/5/28 8:29
 */
public class MyOrderServiceImpl implements IMyOrderService {
    IMyOrderDao myOrderDao = new MyOrderDaoImpl();

    @Override
    public void addMyOrder(MyOrder myOrder) {
        myOrderDao.addMyOrder(myOrder);
    }

    @Override
    public void updateMyOrder(MyOrder myOrder) {
        myOrderDao.updateMyOrder(myOrder);
    }

    @Override
    public void deleteMyOrder(int id) {
        myOrderDao.deleteMyOrder(id);
    }

    @Override
    public List<MyOrder> findAll() {
        return myOrderDao.findAll();
    }

    @Override
    public List<MyOrder> findByUserNameOrId(int userid) {
        return myOrderDao.findByUserNameOrId(userid);
    }

    @Override
    public MyOrder findById(int id) {
        return myOrderDao.findById(id);
    }
}
